package com.itheima.demo1;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.time.temporal.TemporalAccessor;
import java.util.Date;

public class Demo3 {
    public static void main(String[] args) throws ParseException {
        String s="2000-08-08";
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
        Date date=simpleDateFormat.parse(s);
//        Date time=simpleDateFormat.parse(s);
//        long timeEnd=date.getTime();
//        long timeStart=time.getTime();
//        long daymilis=(timeEnd-timeStart);
//        long h=3600*1000*24L;
//        System.out.println(daymilis/h);
//        System.out.println(time);
        SimpleDateFormat simpleDateFormat1 = new SimpleDateFormat("yyyy年MM月dd日");
        String format = simpleDateFormat1.format(date);
        System.out.println(format);
        LocalDateTime time=LocalDateTime.of(2000,8,8,6,30);
        DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy年MM月dd");
        String format1 = dateTimeFormatter.format(time);
        String str = "2000-11-20";
        System.out.println(time);
    }
}
